# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=ferret
pkgver=0.7
pkgrel=2
pkgdesc='Free Entity Relationship and SQL Tables autogeneration Tool. Exports to MySQL, Postgres, XML, SQL95.'
url='http://savannah.gnu.org/projects/ferret/'
arch=('any')
license=('GPL3')
depends=('bash' 'tk' 'tcl')
source=("http://ftp.gnu.org/gnu/$pkgname/$pkgname-$pkgver.tar.gz")
sha512sums=('cc93d78a286df35626f17398f34ad45ca2b7fdf6d464f05efc21ee72eee534f6213a695506dbf8e9fd7d26c23421802b5cca065d22534420e03c9dd297bafbb5')

package() {
  cd "$pkgname-$pkgver"

  install -dm 755 "$pkgdir/usr/bin"
  install -dm 755 "$pkgdir/usr/share/$pkgname"

  wget -c http://ompldr.org/vNm9rdQ -O "$pkgdir/ferret.sh"

  find -name CVS | xargs rm -rf

  install -Dm 755 "$pkgname.sh" "$pkgdir/usr/bin/ferret"

  cp -a $pkgname gerwinml/ src/ widgets/ "$pkgdir/usr/share/$pkgname"
}

